Docs, tests, and CI: API reference, unit test coverage, and documentation updates#71
Merged
charliekilpatrick merged 8 commits intomainfrom Mar 6, 2026
Merged
Docs, tests, and CI: API reference, unit test coverage, and documentation updates#71charliekilpatrick merged 8 commits intomainfrom
charliekilpatrick merged 8 commits intomainfrom
Conversation
- Introduced test_create_error to validate the output of the create_error function. - Enhanced test coverage for image processing functionalities. - Updated README and CONTRIBUTING.md for clarity on testing procedures and documentation deployment.
- Added unit tests for create_error function to ensure expected behavior. - Enhanced test_image_procs.py for better coverage of image processing features. - Revised README and CONTRIBUTING.md to clarify testing guidelines and documentation processes.
- Added additional unit tests for create_error function to improve coverage. - Further refined test_image_procs.py for comprehensive testing of image processing. - Updated README and CONTRIBUTING.md to provide clearer instructions on testing and documentation practices.
…tions - Updated find_catalog to correctly handle K, Ks, and Kspec filters for 2MASS, mapping them to the K-band columns. - Enhanced convert_filter_name to return 'K' for K, Ks, and Kspec filters. - Added unit tests to validate the new behavior for 2MASS K-band filters in test_utilities and test_absphot.
…ame loading - Added a new helper function to read calibration FITS files into CCDData without parsing WCS, addressing issues with ill-conditioned WCS keywords. - Refactored bias, dark, flat, and sky frame loading methods to utilize the new function, improving code clarity and reducing redundancy.
- Introduced a new function, _sanitize_calibration_header, to remove WCS and coordinate keywords from calibration headers, ensuring safe writing of calibration files. - Updated bias, dark, flat, and sky frame writing methods to utilize the new sanitization function, preventing potential InvalidTransformError during WCS parsing. - Improved logging to ensure messages are only displayed when logging is enabled.
- Introduced tests for _sanitize_calibration_header and _read_calibration_ccd functions to ensure proper handling of calibration FITS files and header sanitization. - Added tests for loading bias, dark, flat, and sky frames, verifying that they correctly utilize the new calibration loading methods. - Implemented additional tests for sky subtraction and static mask filename retrieval to enhance overall test coverage.
- Updated the _read_calibration_ccd function to improve efficiency in loading calibration FITS files. - Refactored related loading methods for bias, dark, flat, and sky frames to streamline the process. - Added new unit tests to ensure robust validation of calibration frame loading and processing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR merges the
devbranch intomain, bringing in Sphinx API documentation, a larger unit test suite with integration markers, CI/workflow updates, and refreshed README/contributing docs.Documentation
docs/source/api/: generated RST for all instruments (BINOSPEC, DEIMOS, F2, FOURSTAR, GMOS, IMACS, LRIS, MMIRS, MOSFIRE, baseinstrument), primitives (absphot, calibration, image_procs, photometry, solve_wcs, sort_files), scripts (download_anet_index, download_gemini_data, download_keck_data, main_pipeline), and utils (logger, options, utilities).docs/source/installation.rst,docs/source/index.rst) updated with testing instructions (unit vs integration), links to README/CONTRIBUTING, and deployment note.docs/DEPLOY.mdadded with steps to enable GitHub Pages and deploy docs to https://ciera-transients.github.io/POTPyRI/.dev, offline test command, and PR target branches.Testing
@pytest.mark.integration(e.g.test_absphot,test_cal,test_photometry,test_sort,test_wcs_integration). Runpytest tests -m "not integration"for unit-only (no network).tests/test_instruments.py—instrument_getter(unsupported instrument), Instrument base and GMOS:match_type_keywords,needs_sky_subtraction, getters (pixscale, rdnoise, gain, target, filter, exptime, ampl, binning, out_size, time, number, instrument_name, catalog),format_datasec,raw_format, naming helpers (stk/sci/bkg, mbias/mdark/mflat/msky).tests/test_options.py—init_options,add_paths(raises when path missing, creates dirs).tests/test_utilities.py—find_catalog(PS1, 2MASS, SDSS, UKIRT, SkyMapper, unsupported filter),is_number,parse_coord(degrees, sexagesimal, invalid).tests/test_image_procs.py—test_create_errorforimage_procs.create_error.potpyri.utils.utilities.find_catalogearly returns now consistently return a 6-tuple(catalog, catalog_ID, ra, dec, mag, err)to match the docstring and final return.CI and workflows
.github/workflows/build-test.yml): runspytest -m "not integration"so CI does not depend on external fixture downloads..github/workflows/documentation.yml): deploy step runs only onpushtomain(not on pull_request), so PRs still build docs without updating the live site.Environment and packaging
potpyriinenvironment.ymland related docs (replacingpotpyri_test).pyproject.tomland package metadata/scripts remain aligned with current layout.Scope
potpyri/(instruments, primitives, utils),tests/, anddocs/.main_pipeline INSTRUMENT DATA_PATHand options are unchanged.pytest tests -m "not integration".Checklist
pytest tests -m "not integration"cd docs && make html